#include "widget.h"
#include "ui_widget.h"
#include<QPushButton>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QPushButton* button=new QPushButton(this);
    button->setText("关闭");
    button->move(300,400);
    connect(button,&QPushButton::clicked,this,&QWidget::close);
//    connect(this,&Widget::MySignal,this,&Widget::MySlots);
//    emit MySlots();
}

Widget::~Widget()
{
    delete ui;
}

//void Widget::MySlots()
//{
//    this->setWindowTitle("信号");
//}
//void Widget::on_pushButton_clicked()
//{
//    this->close();
//}
